﻿<Window x:Class="App_AerCloudDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       Title="www.AerCloud.net - Demo" Height="480" Width="640" MinHeight="200" MinWidth="200" Closing="Window_Closing"  FontFamily="Segoe UI Semilight" FontSize="12">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="250*"/>
            <RowDefinition Height="3"/>
            <RowDefinition Height="142*"/>
        </Grid.RowDefinitions>

        <TabControl Grid.Row="0">
            <TabItem Header="Step 1. Access Key">
                <StackPanel  Margin="10,10,2,2">
                    <StackPanel Orientation="Horizontal">
                        <Label Name="lblAccessKey" Content="Enter Access Key:" />
                        <TextBox Name="txtAccessKey" TextChanged="txtAccessKey_TextChanged" Width="150" Margin="2,2,2,2">
                            <TextBox.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFF3F0BE" Offset="0"/>
                                    <GradientStop Color="White" Offset="1"/>
                                </LinearGradientBrush>
                            </TextBox.Background>
                        </TextBox>
                        <Button Content="Connect" Margin="2,2,2,2" Padding="10,2,10,2" Click="Button_Click"/>

                        <Label Content="     You can obtain an access key from" Foreground="#FF9DA8B9" />
                        <Label>
                            <Hyperlink  NavigateUri="https://www.aercloud.net" RequestNavigate="Hyperlink_RequestNavigate">AerCloud.net</Hyperlink>
                        </Label>
                    </StackPanel>

                    <StackPanel >
                        <Label >
                            <TextBlock TextWrapping="Wrap" Text="Please note some of the service calls in this demo software require call credit. It is recommended to use a free basic account for testing this software." Foreground="Red"/>
                        </Label>
                    </StackPanel>
                </StackPanel>
            </TabItem>

            <TabItem Header="Step 2. Save Face">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="180" />
                        <ColumnDefinition Width="40*"/>
                        <ColumnDefinition Width="128"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="23"/>
                        <RowDefinition Height="3*"/>
                    </Grid.RowDefinitions>

                    <Button Name="btnSave" Content="Click to save" Click="btnSave_Click"/>
                    <ListBox Name="lbxFileList" Grid.Row="1" SelectionChanged="lbxFileList_SelectionChanged" IsEnabled="False"/>

                    <Image Name="currentImage" Margin="0,0,0,0" Stretch="Uniform" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="1"/>
                    <Image Name="faceImage" Stretch="Uniform" Margin="0,0,0,0" Grid.Row="1" Grid.Column="2" Grid.RowSpan="1" VerticalAlignment="Bottom" Height="128"/>
                    <Label Name="lblCurrentImage" Grid.Row="1" Grid.Column="1" Padding="2" Background="#FFFFFFA1" Opacity="0.5" Focusable="False"  Height="22" VerticalAlignment="Bottom" Grid.ColumnSpan="1"/>
                </Grid>
            </TabItem>

            <TabItem Header="Step 3. Browse Database">
                <StackPanel Margin="10,10,10,10">
                    <Button Name="btnBrowseDatabase" Content="Browse Database..." Height="22" Padding="0,0,0,0" Click="btnBrowseDatabase_Click"/>
                </StackPanel>
            </TabItem>

            <TabItem Header="Step 4. Search Face">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="180" />
                        <ColumnDefinition Width="40*"/>
                        <ColumnDefinition Width="128"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="23"/>
                        <RowDefinition Height="22*"/>
                        <RowDefinition Height="23"/>
                    </Grid.RowDefinitions>

                    <ListBox Name="lbxQueryFileList" Grid.Row="0" SelectionChanged="lbxQueryFileList_SelectionChanged"  IsEnabled="False" Grid.RowSpan="2"/>
                    <Button Name="btnSearch" Grid.Row="2" Content="Click to initiate face search..." Height="22" Padding="0,0,0,0" Click="btnSearch_Click" Margin="0,0,0,1" IsEnabled="False"/>


                    <Image Name="imgQueryImage" Margin="0,0,0,0" Stretch="Uniform" Grid.Column="1" Grid.Row="0" Grid.RowSpan="3" Grid.ColumnSpan="1"/>
                    <Image Name="imgQueryFace" Stretch="Uniform" Margin="0,0,0,0" Grid.Row="1" Grid.Column="2" Grid.RowSpan="2" VerticalAlignment="Bottom" Height="128"/>
                    <Label Name="lblQueryText" Grid.Row="2" Grid.Column="1" Padding="2" Background="#FFFFFFA1" Opacity="0.5" Focusable="False"  Height="22" VerticalAlignment="Bottom" Grid.ColumnSpan="1"/>
                </Grid>
            </TabItem>
        </TabControl>


        <TextBox Name="txtStatus" Padding="2,2,2,2" Grid.Column="0" Grid.Row="2" BorderBrush="White"
                    IsReadOnly="True"
                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    ScrollViewer.CanContentScroll="True" Foreground="#FF173B66" FontSize="14">
            <TextBox.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0"/>
                    <GradientStop Color="#FFECEAEA" Offset="1"/>
                </LinearGradientBrush>
            </TextBox.Background>
        </TextBox>
    </Grid>


</Window>
